<!--
 * @Author: your name
 * @Date: 2021-08-24 14:49:55
 * @LastEditTime: 2021-08-24 14:57:22
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \briup\5-javascript\day02\2-引用传递.html
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //深复制 引用传递
        var obj1 = {
            name: "zs",
            age: 12
        }
        var obj2 = {
            name: 'lisi',
            age: 16
        }
        console.log(obj1, obj2);
        var obj1 = obj2;
        console.log(obj1, obj2);
        obj1.name = 'lml';
        console.log(obj1, obj2);
        //浅复制 值传递
        var a = 1;
        b = a;
        console.log(a, b);
        a = 2;
        console.log(a, b);
    </script>
</head>

<body>

</body>

</html>
</body>

</html>